<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>交换两个变量的值</title>
</head>
<body>
   <script>
    var leftHand = '西餐刀';
    var rightHand = '西餐叉';
    var temp = leftHand;//声明temp变量并赋值为leftHand的值
    leftHand = rightHand;//将RightHand的值赋给leftHand
    rightHand = temp;//将temp的值赋给rightHand
    console.log(leftHand);
    console.log(rightHand);


   </script> 
</body>
</html>